package models.repository.common;

import models.crawlers.common.SessionParams;
import models.crawlers.events.ProductProcessed;
import models.entities.CrawlerActionEntity;
import models.entities.CrawlerEntity;
import models.entities.CrawlerWarningEntity;
import models.exceptions.CreateEntityException;
import models.exceptions.GetEntityException;
import models.exceptions.UpdateEntityException;

import java.io.IOException;
import java.util.List;
@Deprecated
public interface CrawlerRepository {
    SessionParams createNewSession(int userId, String crawlerName) throws CreateEntityException, IOException;

    void writeAction(CrawlerActionEntity crawlerActionEntity) throws IOException;

    void changeCategoryIndex(int sessionId, int categoryIndex) throws IOException;

    void writeWarning(CrawlerWarningEntity warning) throws IOException;

    void changePageNumber(int sessionId, int pageNumber) throws IOException;

    List<CrawlerEntity> getAllCrawlers() throws GetEntityException, IOException;

    List<SessionParams> getSessions(String crawlerTitle) throws IOException;

    SessionParams getSession(int sessionId) throws IOException;
    void setProductCount(CrawlerEntity crawlerInfo) throws IOException;

    void setCrawlerPosition(ProductProcessed eventObject) throws IOException;

    void updateSession(SessionParams sessionParams) throws IOException;

    CrawlerEntity getCrawlerInfo(String crawlerName) throws GetEntityException, IOException;

    void updateCrawlerInfo(CrawlerEntity crawlerInfo) throws UpdateEntityException, IOException;
}
